![]() |
SetFontLock |
||||
Header: | Fonts.h | Carbon status: | Unsupported | |
Makes the most recently used font unpurgeable. You can use this function when you want a font to remain in memory for the sake of efficiency.
void SetFontLock ( Boolean lockFlag );
Specifies whether or not the current font is considered purgeable. If you set the lockFlag parameter to TRUE, the SetFontLock function makes the most recently used font resource unpurgeable, and reads it into memory if it isn’t already there. If you set the lockFlag parameter to FALSE, the SetFontLock function releases the memory occupied by the most recently used font by calling the ReleaseResource function.
The font considered to be the most recently used is the one referenced by the font output structure in low memory, which is filled in by the FMSwapFont function. This is often, but not always, the font in which text has most recently been drawn. Since both QuickDraw and your application program can call FMSwapFont, you have to be careful about which font has most recently been used in a call to that function. To ensure that you are locking the font that you want to lock, explicitly call FMSwapFont immediately before calling SetFontLock.
Not supported in Carbon. Not available in Carbon.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)